Timothy Taylor of Waltham was arrested near 925 Parker Street in Jamaica Plain, where several neighbors had called about the gunshots, Boston police said.
Officers nearby stopped Taylor as he ran away from the scene and found a loaded .357 magnum revolver shoved into the waistband of his pants, police said. Investigators later learned the gun was stolen, authorities said.
Authorities charged Taylor with unlawful possession of a firearm and ammunition, carrying a loaded gun, and receiving stolen property, Boston police said.
Officers are still investigating who fired the shots and why.
Click here to follow Daily Voice Lynn and receive free news updates.